import { Injectable } from '@angular/core';
import {NzMessageService} from "ng-zorro-antd/message";

@Injectable({
  providedIn: 'root'
})
export class AlertService {

  constructor(private message: NzMessageService) { }


  showSuccess(info:string){
    this.message.success(info,{
      nzDuration: 2000
    })
  }


  showInfo(info:string){
    this.message.info(info,{
      nzDuration: 4000
    })
  }

  showWarning(info:string){
    this.message.warning(info,{
      nzDuration: 4000
    })
  }

  showError(info:string){
    this.message.error(info,{
      nzDuration: 4000
    })
  }

}
